package com.hqbzl.chat.message;

import com.hqbzl.chat.protocol.MessageType;
import com.hqbzl.chat.protocol.Serializer;
import lombok.Builder;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;

import static com.hqbzl.chat.constant.Constants.RPC_REQUEST_MSG_TYPE;

@Builder
@Data
@ToString
public class RpcRequestMessage implements MessageType, Serializable {
    private String interfaceName;
    private String methodName;
    private Class[] parameterTypes;
    private Object[] parameterValus;
    private Class returnType;
    private Integer sequenceId;

    @Override
    public int getMessageType() {
        return RPC_REQUEST_MSG_TYPE;
    }

    @Override
    public int getSequenceId() {
        return this.sequenceId;
    }
}
